import {
  AutoIncrement,
  Column,
  DataType,
  Model,
  PrimaryKey,
  Table,
} from 'sequelize-typescript';

@Table({
  tableName: 'job_templates',
})
export class JobTemplatesModel extends Model {
  @PrimaryKey
  @AutoIncrement
  @Column({
    type: DataType.INTEGER,
    allowNull: false,
    comment: '',
  })
  id: number;

  @Column({
    type: DataType.INTEGER,
    comment: '',
  })
  tempId: number;

  @Column({
    type: DataType.STRING(100),
    comment: '',
  })
  title: string;

  @Column({
    type: DataType.STRING(100),
    comment: '',
  })
  description: string;

  @Column({
    type: DataType.STRING(20),
    comment: '',
  })
  templateName: string;

  @Column({
    type: DataType.INTEGER,
    comment: '',
  })
  status: number;

  @Column({
    type: DataType.STRING(500),
    comment: '',
  })
  templateUrl: string;

  @Column({
    type: DataType.JSON,
    comment: '',
  })
  content: JSON;

  @Column({
    type: DataType.JSON,
    comment: '',
  })
  personalDetails: JSON;
}
